skip checkRepoConfigInaccessible when git directory specified explicitly
authorJoey Hess <joeyh@joeyh.name>
Tue, 20 Sep 2022 18:52:43 +0000 (14:52 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 20 Sep 2022 18:52:43 +0000 (14:52 -0400)
commit8d26fdd6709ba341570bf665f1ace0556bdcf5cb
treed0bd51ce30eccca9f0181ac12f6e519e2bcbc44b
parentd1467a9b8e6fdc16a134a059d9505a0c240d4711
skip checkRepoConfigInaccessible when git directory specified explicitly

Fix a reversion that prevented git-annex from working in a repository when
--git-dir or GIT_DIR is specified to relocate the git directory to
somewhere else. (Introduced in version 10.20220525)

checkRepoConfigInaccessible could still run git config --list, just passing
--git-dir. It seems not necessary, because I know that passing --git-dir
bypasses git's check for repo ownership. I suppose it might be that git
eventually changes to check something about the ownership of the working
tree, so passing --git-dir without --work-tree would still be worth doing.
But for now this is the simple fix.

Sponsored-by: Nicholas Golder-Manning on Patreon
CHANGELOG
Git/Config.hs
Git/Construct.hs
Git/CurrentRepo.hs
Git/Types.hs
doc/bugs/When_--git-dir_is_not_in_--work-tree.mdwn